﻿<Window x:Class="Assembly.Metro.Dialogs.ControlDialogs.Updater"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        x:Name="UpdaterWindow"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        AllowsTransparency="True" ResizeMode="NoResize" WindowStyle="None" WindowStartupLocation="CenterOwner" SnapsToDevicePixels="True" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        Height="150"
        Width="600"
        ShowInTaskbar="False"
        Title="Updater">
    <Window.Resources>
        <Storyboard x:Key="ResizeWindowToUpdate">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UpdaterWindow" Storyboard.TargetProperty="(FrameworkElement.Height)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="400"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.30" Value="150"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </Window.Resources>
    
    <Border Background="#FF2E2E31" BorderThickness="1,1,1,23" BorderBrush="{DynamicResource ExtryzeAccentBrush}">
        <Grid>       
            <Image VerticalAlignment="Top" HorizontalAlignment="Left" Width="35" Margin="5,5,0,0" Source="{DynamicResource ExtryzeAccentLogo}" />
            <TextBlock x:Name="lblTitle" Text="Update Avaiable!" Foreground="#989898" VerticalAlignment="Top" HorizontalAlignment="Stretch" FontSize="15" Margin="45,12,0,0" FontFamily="{DynamicResource MetroFontLight}" TextTrimming="CharacterEllipsis"/>

            <Grid x:Name="updateInfo" Margin="0,0,0,0" Visibility="Collapsed">
                <Grid Margin="0,55,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.45*" />
                        <ColumnDefinition Width="0.55*" />
                    </Grid.ColumnDefinitions>
                    
                    <Border Grid.Column="0" BorderThickness="0,0,1,0" BorderBrush="#FF999999" Margin="0,10,0,10">
                        <Grid>
                            <StackPanel Margin="15,0,10,20">
                                <TextBlock Text="Current Assembly Version:" Style="{DynamicResource GenericTextblock}" />
                                <TextBlock x:Name="lblCurrentVersion" Text="&lt;/current_assembly_version&gt;" Margin="10,2,0,0" Foreground="{DynamicResource ExtryzeAccentBrush}" Style="{DynamicResource GenericTextblock}" />

                                <TextBlock Text="Updated Assembly Version:" Margin="0,5,0,0" Style="{DynamicResource GenericTextblock}" />
                                <TextBlock x:Name="lblServerVersion" Text="&lt;/updated_assembly_version&gt;" Margin="10,2,0,0" Foreground="{DynamicResource ExtryzeAccentBrush}" Style="{DynamicResource GenericTextblock}" />

                                <TextBlock Text="Updated Assembly Hash (MD5):" Margin="0,5,0,0" Style="{DynamicResource GenericTextblock}" />
                                <TextBlock x:Name="lblServerHash" Text="&lt;/updated_assembly_hash_md5&gt;" Margin="10,2,0,0" Foreground="{DynamicResource ExtryzeAccentBrush}" Style="{DynamicResource GenericTextblock}" />
                            </StackPanel>
                            <StackPanel VerticalAlignment="Bottom" Margin="0,0,0,10">
                                <Button x:Name="btnApplyUpdate" Content="Apply Update" Margin="15,10,20,0" Height="30" Click="btnApplyUpdate_Click" />
                                <Button x:Name="btnIgnoreUpdate" Content="Ignore Update" Margin="15,10,20,0" Height="30" Click="btnIgnoreUpdate_Click" />
                            </StackPanel>
                        </Grid>
                    </Border>
                
                    <Border Grid.Column="1" Margin="10,20,20,20">
                    <ScrollViewer VerticalScrollBarVisibility="Auto">
                        <TextBlock x:Name="lblChangeLog" TextWrapping="Wrap" Style="{DynamicResource GenericTextblock}" />
                    </ScrollViewer>
                </Border>
                </Grid>
                
                <Thumb 
					x:Name="headerThumb" 
					Opacity="0" 
					Background="{x:Null}" 
					Foreground="{x:Null}" DragDelta="headerThumb_DragDelta" Margin="0,0,0,0" Height="53.5" VerticalAlignment="Top"
					/>
            </Grid>
            <Grid x:Name="updateProgress">
                <StackPanel Margin="30,60,0,0" VerticalAlignment="Top" >
                    <TextBlock x:Name="lblDownloadProgress" Text="Currently Downloading: &lt;/current_download_item&gt; (&lt;/current_download_percent&gt;%)" Style="{DynamicResource GenericTextblock}" HorizontalAlignment="Left" />
                    <ProgressBar x:Name="pbDownloadProgress" Height="3" Minimum="0" Maximum="100" Margin="0,5,10,5" IsIndeterminate="True" />
                </StackPanel>
            </Grid>
        </Grid>
    </Border>
</Window>